package com.mypro.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * Author: 玄夏
 * Date: 2018/5/14 16:06
 * Description:
 */
public class JDKDynamicTool implements InvocationHandler {

    private Object target;

    public JDKDynamicTool(Object target) {
        this.target = target;
    }

    public Object build() {
        return Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), this);
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return null;
    }

    public static void main(String[] args){
    }
}
